<!--
 * @Description: 
 * @Author: Wen
 * @Date: 2024-11-05 09:33:51
 * @LastEditors: Wen
 * @LastEditTime: 2024-11-05 10:27:28
 * 太棒了，又坚持了一天
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>css选择器</title>
    <style>
        /* 元素1 元素2 */
        /* 会选中元素1下面所有的元素2 */
        div>span{
            color:hotpink
        }
        div:first-child{
            font-size: 50px;
            color: plum;
            font-style: italic;
        }
        /* 鼠标光标全停在元素上时，颜色变为天青，并且鼠标变为小手 */
        #myHover:hover{
            color: aquamarine;
            cursor: pointer;
        }
        #myBtn{
            border: 1px solid gray;
            border-radius: 10px ;
            width: 220px;
            text-align: center;
        }
        #myBtn:hover{
            color: orange;          
            cursor: pointer;
        }
        #divOne{
            width:100px;
            height:100px;
            border: 1px solid gray;
        }
        #dinInner{
            width: 50%;
            min-width: 80px;
            border: 1px solid rgb(192, 57, 57);
        }
    </style>
</head>
<body>
    <!-- <b>加粗</b>
    <i>斜体</i> -->
    <!-- 父元素 -->
    <div>
        <!-- 子元素1 -->
         <span>子元素1</span>
         <!-- 子元素2 -->
         <table>
            <tr>
                <td>
                    <!-- 这里的span是div的后代 不是直接子代 -->
                    <span>子元素2</span>
                </td>
            </tr>
         </table>
         <span>子元素1</span>
         <span>子元素1</span>
         <span>子元素3</span>
         <h2>伪类选择器</h2>
         <div id="myHover">伪类选择器</div>
         <div id="myBtn">点我中奖 </div>
    </div>   
    <div id="divOne">
        <div id="dinInner">宽高测试</div>
     </div>
</body>
</html>